{# Copyright (c) 2006-2007, PreFab Software Inc. #}
{# Modificat per aaloy - apsl.net #}

{% load blog_extras %}
{% load prefab_tags %}
{% load i18n %}

{% if tag or query or taglist or search or userposts or year or month or day %}
<dl>
    <dt>
&nbsp;{% if tag or query %}{% if not object_list %}{% trans "No s'han trobat articles "%} {% endif %}{% if object_list %} {% endif %}{% endif %}
{% if tag %}{% trans "amb marca "%}'{{ tag }}'
{% else %}{% if query %}{% trans "cerques que contenguin" %} '{% for term in query %}{{ term }}{% if not forloop.last %}, {% endif %}{% endfor %}'
{% else %}{% if year %}{% trans "Arxiu :"%} {{ year }} 
{% else %}{% if month %}{% trans "Arxiu: "%}{{ month|date:"F Y" }}
{% else %}{% if day %}{{ day|date:"F Y" }}
{% else %}{% if taglist %}{% trans "Arxiu de tags"%}
{% else %}{% if search %}{{ search }}
{% else %}{% if userposts and not object_list %}{% trans "No s'han trobat entrades per "%}{{ postedby|title }}
{% else %}{% if userposts and object_list %}{% trans "Entrades escrites per "%}{{ postedby|title }}
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
{% else %}
{% if object and not day and not month and not year and not query and not tag and not taglist and not search and not userposts %}
</dt>
</dl>
<ul>
{% get_previous object.id previous_post %}
{% if previous_post %}
<li>
<a href='{{ previous_post.get_absolute_url }}' rel='previous'>{{ previous_post.headline }}</a>
{% endif %}
</li>
{% get_next object.id next_post %}
{% if next_post %}
<li><a href='{{ next_post.get_absolute_url }}' rel='next' >{{ next_post.headline }}</a></li>
{% endif %}
</ul>
{% endif %}
{% endif %}

{% if day %}
<ul>
{% for d in days %}
{% ifnotequal d "no" %}
{% ifequal d "yes" %}
<li>
<a href='{% setting 'BLOG_ROOT' %}{{ day|date:"Y/m" }}/{{ forloop.counter }}/'>{{ forloop.counter }}</a>
</li>
{% endifequal %}
{% ifequal d "current" %}
<li>
<strong>[{{ forloop.counter }}]</strong>
</li>
{% endifequal %}
{% endifnotequal %}
{% ifequal d "no" %}
<li>{{ forloop.counter }}</li>
{% endifequal %}
{% endfor %}
</ul>
{% endif %}